package com.winderinfo.yikaotianxia.ui.report;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.winderinfo.yikaotianxia.ui.mockexam.AnswerBean;
import com.winderinfo.yikaotianxia.ui.mockexam.AnswerCardFragment;
import com.winderinfo.yikaotianxia.ui.mockexam.AnswerFragment;

import java.util.List;

public class QuestionAdapter extends FragmentPagerAdapter {

    private List<QuestionListBean.YkScoreBean.YkAnswerRecordsBean> mTableList;


    public QuestionAdapter(FragmentManager fm, List<QuestionListBean.YkScoreBean.YkAnswerRecordsBean> mTableList) {
        super(fm);
        this.mTableList = mTableList;
    }


    @Override
    public Fragment getItem(int i) {
        QuestionFragment questionFragment = new QuestionFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable("list", mTableList.get(i));
        bundle.putInt("sum", mTableList.size());
        bundle.putInt("num", i);
        questionFragment.setArguments(bundle);
        return questionFragment;
    }

    @Override
    public int getCount() {
        return mTableList.size();
    }

}
